<?php

class CodeSpace_Menu_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract{
    
    public function postDispatch (Zend_Controller_Request_Abstract $request)
    {

        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
        $view = $viewRenderer->view;
        
        require_once APPLICATION_PATH . '/configs/menu.php';

        $config = new Zend_Config($nav);
        $navigation = new Zend_Navigation($config);
        Zend_Registry::set(
			'Zend_Navigation', $navigation
        );
        if(Zend_Registry::isRegistered('Zend_Translate')){
            $view->navigation(Zend_Registry::get('Zend_Navigation'))
                ->setTranslator(Zend_Registry::get('Zend_Translate'));
        }
    }
}

?>